package moriarty.gwt.client;

import java.util.List;

import moriarty.gwt.shared.DataStoreObject;
import moriarty.gwt.shared.Group;
import moriarty.gwt.shared.Submission;
import moriarty.gwt.shared.User;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * The async counterpart of SotdService
 */
public interface SotdServiceAsync {
	void sotdServer(String input, AsyncCallback<String> callback)
			throws IllegalArgumentException;
	void updateEmails(String emails, AsyncCallback<Void> callback);
	void getSubscriberList(AsyncCallback<String> callback);
	void storeSubmission(Submission submission, AsyncCallback<Void> callback);
	void retrieveSubmissions(AsyncCallback<List<Submission>> callback);
	void retreiveAllGroups(AsyncCallback<List<Group>> callback);
	void storeGroup(Group g, AsyncCallback<Group> callback);
	void getCurrentUserEmail(AsyncCallback<String> callback);
	void isCurrentUserAdmin(AsyncCallback<Boolean> callback);
	void storeUser(User u, AsyncCallback<Void> callback);
	void isMember(String email, AsyncCallback<Boolean> asyncCallback);
	void getCurrentUser(String gmailEmail, AsyncCallback<User> callback);
	void updateDataStoreObject(DataStoreObject dso, AsyncCallback<Void> callback);
}
